using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MbUnit.Framework;
using fit;

namespace Frost {
    public class FitTestStrategy : ITestStrategy {
        public FitTestStrategy() {
            
        }

        public IResult RunTest(ITest test) {
            if (test == null)
		        throw new ArgumentNullException("test", "test is null.");
            
            var fitTest = test as FitTest;
            if (fitTest == null)
                throw new IncorrectTestTypeException(typeof(FitTest), test.GetType());

            var fitFixture = new Fixture();
            fitFixture.doTables(fitTest.ParsedFit);
            
            
            return new FitResult(fitTest.ParsedFit);
        }

    }
}
